using System;
using System.Collections.Generic;
using PropertyExpression.Common;

namespace PropertyExpression.ReactiveRelation
{
    public interface IPropertyValue<T> : IValue<T>, IPropertyHolder<T>
    {
        IEnumerable<object> GetReverseEntities(object sender, IPreviousValueProcessor previousValueProcessor);

        IEnumerable<ICell> GetReverseCells();

        IEnumerable<object> GetReverseEntitiesForCollection(object sender, IPreviousValueProcessor previousValueProcessor);

        IOptionalResult<TResult> ProcessOneToManyCollectionNewItem<TResult>(
            Func<object, TResult> addEntityFunc, 
            Func<object, TResult> removeEntityFunc,
            Func<TResult> notExistFunc, 
            IPropertySettor propertySettor, 
            IOneToManyCollectionNewItemProcessor oneToManyCollectionNewItemProcessor);
    }
}